package com.ssh.controler;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;

import com.base.controler.BaseAction;
import com.ssh.model.TestModel;
import com.ssh.service.ITestService;

@Controller
public class TestAction extends BaseAction {
	private TestModel testModel;
	@Resource
	private ITestService testServiceImpl;
	private List<TestModel> testModelList;
	
	public String add(){
		testServiceImpl.add(testModel);
		return "success";
	}
	
	public String view(){
		testModelList = testServiceImpl.findList();
		return "view";
	}

	public TestModel getTestModel() {
		return testModel;
	}

	public void setTestModel(TestModel testModel) {
		this.testModel = testModel;
	}

	public List<TestModel> getTestModelList() {
		return testModelList;
	}
	
	
	
}
